package com.cy.ppj.dao.mapper.account;

import com.cy.ppj.model.domian.statistics.StatisticsUserCommission;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import tk.mybatis.mapper.common.BaseMapper;

@Mapper
public interface StatisticsUserCommissionMapper extends BaseMapper<StatisticsUserCommission> {

    @Insert(" INSERT INTO t_statistics_user_commission ( `user_id`, `type`, `amount`, `create_time` ) "
            + " VALUES ( #{userId}, #{type}, #{amount}, #{createTime}) "
            + " ON DUPLICATE KEY UPDATE "
            + " `update_time` = VALUES( `create_time` ), `amount` = `amount` + VALUES( `amount` ) ")
    void insertStatisticsUserCommission(StatisticsUserCommission statisticsUserCommission);

}
